#!/bin/bash

file="/data/wwwroot/special-spa/public/uploads/font/font.signal"

# 检查文件是否存在
if [ -e "$file" ]; then
    # 执行字蛛进行压缩
    font-spider /data/wwwroot/special-spa/public/uploads/font/res.html

    current_timestamp=$(date +%s)
    echo "$current_timestamp" > /data/wwwroot/special-spa/public/uploads/font/.ssi

    # 删除文件信号文件
    rm "$file"
fi